package gui;

import autonomrobot.ImageProcessor;
import autonomrobot.ImageResource;
import autonomrobot.ReadImage;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author Ragnar
 */
public class NewClass extends JFrame
{
    private ImageResource ir;
    private Image img = new ImageIcon("test.png").getImage();
    
    public NewClass()
    {
        ir = new ImageResource();
        ReadImage ri = new ReadImage(ir);
        ImageProcessor ip = new ImageProcessor(ir);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setMinimumSize(new Dimension(400,300));
        this.setLocationRelativeTo(null);
        JPanel panelbg = new JPanel()
        {
            @Override
            public void paintComponent(Graphics g)
            {
                super.paintComponent(g);
                g.drawImage(img, 0, 0, null);
            }
        };
        this.setContentPane(panelbg);
        this.setVisible(true);
    }
    
    public static void main(String[] args)
    {
        NewClass n = new NewClass();
    }
}
